import request from '@/utils/request'

// 合作商列表
export function getPartner(params) {
  return request({
    url: '/user-service/partner/search',
    method: 'get',
    params
  })
}

// 新增合作商
export function addPartner(data) {
  return request({
    url: '/user-service/partner',
    method: 'post',
    data
  })
}
// 修改合作商
export function updatePartner(id, data) {
  return request({
    url: '/user-service/partner/' + id,
    method: 'put',
    data
  })
}
// 重置合作商密码
export function detailPartner(id) {
  return request({
    url: '/user-service/partner/resetPwd/' + id,
    method: 'PUT'
  })
}
// 删除合作商
export function deletePartner(id) {
  return request({
    url: '/user-service/partner/' + id,
    method: 'delete'
  })
}
